public class Solution {
    public boolean Find(int target, int [][] array) {
        int len=array.length;
        int len1=array[0].length;
        if(len==0||len1==0)return false;
        int f=0;
        int l=len1-1;
        while(f<len&&l>=0){
            if(target==array[f][l]){
                return true;
            }else if(target>array[f][l]){
                f++;
            }else{
                l--;
            }
        }
    return false;
    }
}